Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBC Parser - Fix yacc warnings #1082

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

frogonwheels
Copy link
Contributor

There are some warnings in the %type definitions for yacc which I believe this fixes.

I'm not knowledgeable about yacc/flex files, however I believe this is a valid fix.

@dexterbg
Copy link
Member

I don't see any difference when building from this branch, but I also don't see %type warnings, only shift/reduce conflicts.

@frogonwheels
Copy link
Contributor Author

frogonwheels commented Nov 26, 2024 via email

@dexterbg
Copy link
Member

I meant I also don't see %type warnings without this change, so these seem to be a local issue of your build environment?

@frogonwheels
Copy link
Contributor Author

frogonwheels commented Nov 26, 2024 via email

@frogonwheels
Copy link
Contributor Author

Here are the warnings I get:

YACC dbc_parser.y
/home/michaelg/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/dbc/src/dbc_parser.y:158.35-38: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
158 | %type T_ID T_STRING_VAL version_section signal_mux
| ^~~~
/home/michaelg/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/dbc/src/dbc_parser.y:158.40-51: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
158 | %type T_ID T_STRING_VAL version_section signal_mux
| ^~~~~~~~~~~~
/home/michaelg/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/dbc/src/dbc_parser.y:159.35-43: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
159 | %type T_INT_VAL signal_endian signal_sign signal_start signal_length
| ^~~~~~~~~
/home/michaelg/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/dbc/src/dbc_parser.y:160.35-46: warning: POSIX yacc reserves %type to nonterminals [-Wyacc]
160 | %type <double_val> T_DOUBLE_VAL double_val signal_scale signal_offset signal_min signal_max
| ^~~~~~~~~~~~
/home/michaelg/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/dbc/src/dbc_parser.y: warning: 6 shift/reduce conflicts [-Wconflicts-sr]
/home/michaelg/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/dbc/src/dbc_parser.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples

@dexterbg
Copy link
Member

I've recently updated my OS yet still only get the shift/reduce conflict:

YACC dbc_parser.y
/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/dbc/src/dbc_parser.y: warning: 6 shift/reduce conflicts [-Wconflicts-sr]

That's all.

YACC is bison in POSIX yacc emulation mode on my system, and bison is:

bison (GNU Bison) 3.0.4

@frogonwheels
Copy link
Contributor Author

frogonwheels commented Jan 11, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants